Skip to content

fix: normalize localhost bind host; simplify codex web card to url-only - #175

Merged
ranxianglei merged 1 commit into
masterfrom
2026-08-19_bind-host-and-web-codex-card
Aug 19, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-08-19_bind-host-and-web-codex-card

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Field report in #2 (two parts):

1. http://127.0.0.1:8787 unreachable while http://localhost:8787 works.
bili-side defensive fix: if the listen host is set to localhost (via --host, ACP_HOST, or config file), Node may resolve it to ::1 and bind IPv6-only — then localhost (client tries ::1) works while 127.0.0.1 (IPv4) is refused. loadOptions now normalizes localhost → 127.0.0.1 (src/config.ts). Other causes live outside bili and are now documented on the web card: HTTP(S)_PROXY without NO_PROXY, or bili inside WSL2/Docker (Windows forwards localhost into WSL2 but not 127.0.0.1).

2. Web config "Codex(ChatGPT 登录)" card required two lines; url alone should suffice.
codex's default model provider is already openai, so model_provider = "openai" is redundant. Copy-snippet and 配置 row now show only openai_base_url = "…/bili/https://chatgpt.com/backend-api/codex", with a 说明 row covering: add model_provider back if it was customized; NO_PROXY hint; WSL2 hint.

Tests: loadOptions host normalization (localhost→127.0.0.1, explicit hosts pass through). Pre-flight: typecheck ✓, 454/454 ✓, build ✓. cc #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant